<include file="Tpl/Public/admin_top.html">
<form action="__APP__/admin{url}purviewUpdate{shtml}" method="post">
	<table width=98% height="auto" cellspacing=0 cellpadding=0 border=1 style="margin:auto;border:1px solid #ccc">
		<tr>
			<td height="40" style="line-height:40px;background:url('{site}/Public/images/topbg.jpg')"><span style="font-size:16px;text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);color:#333;font-weight:bold;">{arr->user} 的权限</span></td>
		</tr>
		<tr>
			<td height="30" style="line-height:30px;font-size:15px;color:#222;font-weight:bold;"><input type="checkbox" onchange="selectAll()">版块名称</td>
		</tr>
<?php
 if(!empty($this->array_two['list'])){
 	foreach($this->array_two['list'] as $vo){
?>
			<tr onmouseover="addClass(this)" onmouseout="removeClass(this)">	
				<td height="30" style="line-height:30px;font-size:12px;color:#555;"><input type="checkbox" name="ck[]" value="<?php echo $vo['id']; ?>" <?php if(in_array($vo['id'],$this->array_array['purviews'])){echo 'checked';} ?>>&nbsp;<?php echo $vo['szone']; ?></td>
			</tr>
<?php
	}
}
?>
<tr>
	<td>
		<input type="hidden" name="token" value="{token}">
		<input type="hidden" name="id" value="{arr->id}">
		<input type="image" src="{site}/Public/images/edit.gif"></td>
</tr>
	</table>
</form>
	<script>
		var zt=false;
		function selectAll()
		{
		 if(zt==true)
		  {zt=false;}
		 else
		 	{zt=true;}
		   var a = document.getElementsByTagName("input");
		   for (var i=0; i<a.length; i++) 
			  {
			    if (a[i].type == "checkbox") a[i].checked = zt;
			  }
		}
		var tr=document.getElementsByTagName("tr");
		for(var n=0;n<tr.length;n++)
		{
			if(n==0||n==1) continue;
			if(n%2==0&&n!=0)
			{
				tr[n].className="tr0";	
			}else{
				tr[n].className="tr1";	
			}
		}
	</script>
</body>
</html>